Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: randomize all layer types #252

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

fix: randomize all layer types #252

wants to merge 12 commits into from

Conversation

aski02
Copy link
Collaborator

@aski02 aski02 commented Dec 18, 2024

References #18.

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.12%. Comparing base (f24ebd6) to head (9e2a957).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #252      +/-   ##
==========================================
+ Coverage   92.11%   92.12%   +0.01%     
==========================================
  Files          55       55              
  Lines        2345     2350       +5     
==========================================
+ Hits         2160     2165       +5     
  Misses        185      185              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@dilyabareeva dilyabareeva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @aski02. Thanks for your work. I have two major comments:

  1. The tests are only checking if parameters have been changed after randomization. Could we add tests that do inference on a batch of random data and see if the model output NaNs? That was the main reason we limited randomization to Linear layers previously.
  2. As far as I remember, the current approach didn't work for BatchNorm layers. Could we add tests for them as well?

@aski02 aski02 requested a review from dilyabareeva January 12, 2025 20:32
Copy link
Owner

@dilyabareeva dilyabareeva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @aski02, I have added some comments :)

tests/metrics/test_heuristics_metrics.py Show resolved Hide resolved
@@ -67,17 +69,25 @@ def test_randomization_metric(
tmp_path,
request,
):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add some additional (tiny) architectures to conftest.py, and add a couple of parameterizations (extra items in the parametrization list) with these architectures? Maybe the easiest would be to create those tiny architectures manually, and not train them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants